<template>
  <FormItem :label="label" :prop="prop" :single="single">
    <paas-tree :params="params" :disabled="see || disabled" :multiple="multiple" :model-value="modelValue"
    @change="change" @input="input" :url="url"></paas-tree>
  </FormItem>
</template>
<script>

export default {
  name: "FormTree",
  props: {
    multiple: { default: false },
    single: { default: false },
    modelValue: {
    },
    params: {},
    label: "",
    prop: "",
    disabled: { default: false },
    url: "",
  },
  computed: {
    see() {
      return this.$store.forms.see;
    }
  },
  methods: {
    input(data) {
      this.$emit("update:modelValue", data.value);
      this.$emit("input", data);
    },
    change(data) {
      this.$emit("update:modelValue", data.value);
      this.$emit("change", data);
    },
  }
};
</script>